#include <bits/stdc++.h>
using namespace std;
long long quickpow(long long x,long long y)
{
	long long ans=1;
	while(y!=0)
	{
		if(y%2==1)
		{
			ans=ans*x;
		}
		x=x*x;
		y=y/2;
	}
	return ans;
}
int main()
{
	long long x,y;
	cin >> x >> y;
	cout << quickpow(x,y) << endl;
	return 0;
}
